import request from '@/utils/request'

export function minIoDownLoadFile(appendix) {
    return request({
      url: '/common/minio/downLoad/'+appendix,
      method: 'get',
    })
  }
// 查询合同信息列表
export function listContract(query) {
  return request({
    url: '/contract/contract/list',
    method: 'get',
    params: query
  })
}

// 查询合同信息详细
export function getContract(id) {
  return request({
    url: '/contract/contract/' + id,
    method: 'get'
  })
}

// 新增合同信息
export function addContract(data) {
  return request({
    url: '/common/minio/upload',
    method: 'post',
    headers: {
        'Content-Type': 'multipart/form-data'
    },
    data: data
  })
}

// 修改合同信息
export function updateContract(data) {
  return request({
    url: '/contract/contract',
    method: 'put',
    headers: {
      'Content-Type': 'multipart/form-data'
  },
    data: data
  })
}

// 删除合同信息
export function delContract(id) {
  return request({
    url: '/contract/contract/' + id,
    method: 'delete'
  })
}
// 审核通过合同信息
export function auditPassContract(data) {
  return request({
    url: '/contract/contract/auditpass',
    method: 'put',
    data: data
  })
}
// 审核不通过合同信息
export function auditNoPassContract(data) {
  return request({
    url: '/contract/contract/auditnopass',
    method: 'put',
    data: data
  })
}

// 确认盖章合同信息
export function affixContract(data) {
  return request({
    url: '/contract/contract/affix',
    method: 'put',
    data: data
  })
}
